/*
 * @Author: 张晨旭
 * @Date: 2021-04-28 15:58:17
 * @LastEditTime: 2021-04-28 20:45:09
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \ribao\daily-1807a-6\项目代码\project2\Wipi_plog\src\components\works\setting.tsx
 */
import React, { useEffect, useState } from 'react';
import { Form, Input, Button, Radio } from 'antd';
import { InfoCircleOutlined } from '@ant-design/icons';
import styles from "./setForm.less"


const FormLayoutDemo = () => {
    const [form] = Form.useForm()
    const onFinish = (values: any) => {
      console.log('Success:', values);
    };
  
    const onFinishFailed = (errorInfo: any) => {
      console.log('Failed:', errorInfo);
    };
  
    useEffect(() => {
     console.log(form);
     form.setFieldsValue({
      API:"https://blog.wipi.tech/",
      APIh:"https://admin.blog.wipi.tech/",
      APIa:"小楼又清风",
      APIb:"https://wipi.oss-cn-shanghai.aliyuncs.com/2021-02-20/wipi-logo.png",
      APIc:"https://wipi.oss-cn-shanghai.aliyuncs.com/2021-02-20/wipi-favicon.png",
      APId:`<p>Designed by <a href="https://github.com/fantasticit/wipi" target="_blank">Fantasticit</a> . <a href="https://admin.blog.wipi.tech/" target="_blank">后台管理</a></p>
      <p>Copyright © 2021. All Rights Reserved.</p>
      <p>皖ICP备18005737号</p>`
     })
    }, [])

    return (
      <Form
      form={form}
      layout="vertical"
      initialValues={{ remember: true }}
      onFinish={onFinish}
      onFinishFailed={onFinishFailed}
    >
       <Form.Item label="系统地址:" name="API">
        <Input placeholder="请输入系统地址" />
      </Form.Item>

      <Form.Item label="后台地址:"  name="APIh">
        <Input placeholder="请输入后台地址" />
      </Form.Item>

      <Form.Item label="系统标题:" name="APIa">
        <Input placeholder="请输入系统标题，将作为head.title显示" />
      </Form.Item>

      <Form.Item label="Logo:" name="APIb">
        <Input placeholder="请输入logo链接活选择文件，也可输入html" />
      
      </Form.Item>

      <Form.Item label="Favicon:" name="APIc" >
        <Input placeholder="请输入favicon链接或者选择文件" />
      </Form.Item>
      
      <Form.Item label="页脚信息:" name="APId" >
        <textarea className={styles.text} placeholder="请输入favicon链接或者选择文件" />
      </Form.Item>

      <Form.Item>
        <Button type="primary" htmlType="submit">
          Submit
        </Button>
      </Form.Item>
    </Form>
    );
  };
  export default FormLayoutDemo
  
